Skip to content

PYTHON-5991 - [pymongocrypt] Bundle libmongocrypt 1.20.2 - #1216

Merged
blink1073 merged 5 commits into
mongodb:masterfrom
blink1073:PYTHON-5991
Aug 17, 2026
Merged

PYTHON-5991 - [pymongocrypt] Bundle libmongocrypt 1.20.2#1216
blink1073 merged 5 commits into
mongodb:masterfrom
blink1073:PYTHON-5991

Conversation

@blink1073

@blink1073 blink1073 commented Aug 14, 2026

Copy link
Copy Markdown
Member

Summary

Bundles libmongocrypt 1.20.2 and renames text_opts to string_opts. The rename is breaking, so this becomes release 1.19.0.

Motivation

PYTHON-5991 asks for bundled libmongocrypt at 1.20.2 or greater. 1.20.2 adds checks when creating GCP requests.

Changes

  • Bundle libmongocrypt 1.20.2 in release wheels, and regenerate the SBOM
  • Rename the text_opts parameter to string_opts
  • Bump the version to 1.19.0.dev0, matching the changelog heading
  • Add tests for the deprecated "textPreview" algorithm and the "*Preview" query type aliases
  • Correct the changelog, which wrongly claimed the "*Preview" query types had been replaced. They remain as aliases
  • Point the SBOM check at scripts/update-version.sh, replacing a reference to a script that does not exist

Testing

Standard unit tests in Evergreen.

Breaking changes

text_opts becomes string_opts on ExplicitEncryptOpts and ExplicitEncrypter.encrypt, with no alias. Keyword callers raise TypeError; positional callers are unaffected.

Bump the bundled libmongocrypt version and regenerate the SBOM.

The C sources in this repo already contain everything through the 1.20.2
tag, so binding.py needs no regeneration.

Also correct the text_opts docstrings, which still referred to the
"textPreview" algorithm. That name was removed in libmongocrypt 1.20.0 in
favor of "string".
@blink1073
blink1073 requested a review from NoahStapp August 14, 2026 20:05
@blink1073
blink1073 marked this pull request as ready for review August 14, 2026 20:05
@blink1073
blink1073 requested a review from a team as a code owner August 14, 2026 20:05
@blink1073
blink1073 marked this pull request as draft August 17, 2026 11:39
libmongocrypt asks drivers to expose these options as "string" rather than
"text", so rename the parameter to match the algorithm it configures.

Add tests for the deprecated spellings that libmongocrypt still accepts or
rejects, so a future libmongocrypt bump cannot change either behavior
silently:

- the "textPreview" algorithm raises
- "prefixPreview", "suffixPreview", and "substringPreview" produce payloads
  identical to "prefix", "suffix", and "substring"

PYTHON-5959 drops the three query type aliases.

Also correct the changelog, which claimed those three query types had already
been replaced. They remain accepted as aliases.
The changelog now heads the release as 1.19.0, so bump __version__ to match.
hatch reads the version from this file, so the built wheel carries it.

The SBOM freshness check pointed at "update-sbom.sh", which does not exist.
The script that regenerates the SBOM is scripts/update-version.sh.
@blink1073
blink1073 marked this pull request as ready for review August 17, 2026 17:04
@blink1073
blink1073 merged commit ed4d091 into mongodb:master Aug 17, 2026
65 of 68 checks passed
@blink1073
blink1073 deleted the PYTHON-5991 branch August 17, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants